home *** CD-ROM | disk | FTP | other *** search
/ Macworld Expo - Develope…Central & Net Innovations / Developer Central and Net Innovators (MacWorld Expo) (January 1999).iso / Developer Central / Bowers Development / Demo AppMaker / Examples / C⁄C++ OS8 / LayerGroups / DEditFieldsData.cp < prev    next >
Encoding:
Text File  |  1998-10-23  |  1.6 KB  |  114 lines  |  [TEXT/CWIE]

  1. // DEditFieldsData.cp -- data container class for LayerGroups
  2.  
  3. #include "AMEngine.h"
  4. #include "PString.h"
  5. #include "DEditFieldsData.h"
  6.  
  7.  
  8. //----------
  9. DEditFieldsData::DEditFieldsData ()
  10. {
  11.     mFBFullLength = 0.0;
  12.     mFBBodyWidth = 0.0;
  13.     mFBShSlope = 0.0;
  14.     mEditingWhat = 1;
  15. }
  16.  
  17. //----------
  18. DEditFieldsData::~DEditFieldsData ()
  19. {
  20. }
  21.  
  22. //----------
  23. void    DEditFieldsData::CopyFrom (
  24.     const DEditFieldsData&        inOther)
  25. {
  26.     mFBFullLength = inOther.mFBFullLength;
  27.     mFBBodyWidth = inOther.mFBBodyWidth;
  28.     mFBShSlope = inOther.mFBShSlope;
  29.     mEditingWhat = inOther.mEditingWhat;
  30. }
  31.  
  32. //----------
  33. void    DEditFieldsData::ReadFromFile (
  34.     AMEngine*        engine)
  35. {
  36. }
  37.  
  38. //----------
  39. void    DEditFieldsData::WriteToFile (
  40.     AMEngine*        engine)
  41. {
  42. }
  43.  
  44.  
  45. //----------
  46. double        DEditFieldsData::GetFBFullLength () const
  47. {
  48.  
  49.     return mFBFullLength;
  50. }
  51.  
  52. //----------
  53. void    DEditFieldsData::SetFBFullLength (
  54.     double        inValue)
  55. {
  56.     mFBFullLength = inValue;
  57.     SetEditingWhat (1);    
  58.  
  59.     SignalDataChanged (idFBFullLength);
  60. }
  61.  
  62.  
  63. //----------
  64. double        DEditFieldsData::GetFBBodyWidth () const
  65. {
  66.  
  67.     return mFBBodyWidth;
  68. }
  69.  
  70. //----------
  71. void    DEditFieldsData::SetFBBodyWidth (
  72.     double        inValue)
  73. {
  74.     mFBBodyWidth = inValue;
  75.     SetEditingWhat (2);    
  76.  
  77.     SignalDataChanged (idFBBodyWidth);
  78. }
  79.  
  80.  
  81. //----------
  82. double        DEditFieldsData::GetFBShSlope () const
  83. {
  84.  
  85.     return mFBShSlope;
  86. }
  87.  
  88. //----------
  89. void    DEditFieldsData::SetFBShSlope (
  90.     double        inValue)
  91. {
  92.     mFBShSlope = inValue;
  93.     SetEditingWhat (3);    
  94.  
  95.     SignalDataChanged (idFBShSlope);
  96. }
  97.  
  98.  
  99. //----------
  100. SInt32        DEditFieldsData::GetEditingWhat () const
  101. {
  102.  
  103.     return mEditingWhat;
  104. }
  105.  
  106. //----------
  107. void    DEditFieldsData::SetEditingWhat (
  108.     SInt32        inValue)
  109. {
  110.     mEditingWhat = inValue;
  111.     
  112.     SignalDataChanged (idEditingWhat);
  113. }
  114.